//
//  Groups.m
//  好友列表
//
//  Created by 伍银荣 on 2021/6/8.
//  Copyright © 2021 com.example. All rights reserved.
//

#import "Groups.h"
#import "Friends.h"

@implementation Groups

-(instancetype)initWithDictionary:(NSDictionary *)dict {
    if (self = [super init]) {
        [self setValuesForKeysWithDictionary:dict];
        NSMutableArray *mArr = [NSMutableArray array];
        for (NSDictionary *dict_sub in self.friends) {
            Friends *friendsModel = [Friends friendsWithDicitonary:dict_sub];
            [mArr addObject:friendsModel];
        }
        self.friends = mArr;
    }
    return self;
}

+(instancetype)groupWithDictionary:(NSDictionary *)dict {
    return [[self alloc]initWithDictionary:dict];
}

@end
